unit DemoDM_U;

interface

uses
  SysUtils, Classes, forms,DB, DBTables, AcroMultiDD,IniFiles,Windows;

type
  TMultiDM = class(TDataModule)
    AcroMultiStreamDD_GUI: TAcroMultiStreamDD;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  TOptions=class
  protected
    procedure Read;
    procedure Write;
  public
    CodePage:string;
    SeqNo:string;
    constructor Create;
    destructor Destroy;override;
  end;
var
  MultiDM: TMultiDM;
  Options:TOptions;

implementation

{$R *.dfm}

{ TOptions }

constructor TOptions.Create;
begin
  CodePage:=InttoStr(GetACP);
  SeqNo:='0';
//  Read;
end;

destructor TOptions.Destroy;
begin
//  Write;
  inherited;
end;

procedure TOptions.Read;
var
  FI:TIniFile;
  FN:string;
begin
  FN:=ChangeFileExt(Application.ExeName,'.ini');
  if FileExists(FN) then
  begin
    FI:=TIniFile.Create(FN);
    try
      CodePage:=FI.ReadString('Language','CodePage',InttoStr(GetACp));
    finally
      FI.Free;
    end;
  end;
end;

procedure TOptions.Write;
var
  FI:TIniFile;
  FN:string;
begin
  FN:=ChangeFileExt(Application.ExeName,'.ini');
  FI:=TIniFile.Create(FN);
  try
    FI.WriteString('Language','CodePage',CodePage);
  finally
    FI.Free;
  end;
end;

initialization
  Options:=TOptions.Create;
finalization
  Options.Free;
end.
